Request Routing System are used to direct client requests to the nearest CDN
Proxy Servers are used to serve the actual content from RAM to clients
Distribution System is responsible for distributing content to the actual Proxy Servers in different CDN facilities
Origin Servers are where the actual content originates that is eventually served by CDN
Management System is responsible for updating statistics about cache hits, cache misses, etc..
Push CDN is where Origin Servers push content directly to PoP Proxy Servers
Useful for static content delivery
If the content is rapidly changing, then it may be hard to keep it up to date
Pull CDN is where the Proxy Servers pull data from Origin Servers when they don't have it to serve to clients
Like a cache at this point
Will delete files after a certain time / deletion policy
More useful for serving dynamic content that's constantly changing
Dynamic / rapid changing content is better served by Pull CDN where the changed data can be re-found and served, and Push CDN is better for static content like company logo's and old news articles
Dynamic Content Caching Optimizations
Dynamic content can be generated at proxy servers by running static scripts with updated data
For example, if there is weather information we include in an app we can run the weather scripts on the Proxy Servers and generate that data locally vs on Origin Servers
Edge Side Includes (ESI) helps us when a majority of the HTML code we are serving hasn't changed, except for a small part, we can only calculate that new small part
Dynamic Adaptive Streaming over HTTP (DASH) allows us to fetch different portions of video at different resolutions to serve video
Distributing data to the huge number of Proxy Servers from the Origin Server can place a large burden on the Origin Server
We use a Tree Structure for Data Distribution where each of the edge Proxy Servers are apart of hierarchies across a tree, and they can all send the new data to each other
DNS Redirect is when a DNS server returns another URI instead of an IP - we can use this to specify Proxy Servers when a client requests it
Depending on Network Distance + Load on Proxy Servers the DNS redirect will choose a specific Proxy to send client to
Always a risk that data on CDN Proxy Servers will be inconsistent with Origin Servers
Pull CDN's will do periodic polling - this is unnecessary bandwidth on Origin Servers
Time To Live (TTL) is a better option than periodic polling, because we can set the TTL of very static content to be longer
Leases also work well because they are a promise to the Proxies that if the data should change anytime before the Lease is up, the Origin will notify Proxies